<?php
/*
* Author: Jason ZHENG <zmj522008@hotmil.com>
* Date  : 2018/05/16
* Class : Show
*/
namespace app\index\controller\product;

use think\Controller;
use think\Db;
use think\Request;
/**
 * 三级联动地区
 */
class Show extends Controller
{

	public function index(Request $request)
	{
		include('header.html');
		$post = $request->post();
		$product = self::getProduct($post['pid']);
		echo "<img src= "."http://local.realshare.com/api/public/".$product['pic_url'].">";
		var_dump($product);
	}

	public static function getProduct($pid)
	{
		$product = Db::table('product')->where(['id' => $pid])->find();
		return $product;
	}
}